package com.beamfield.dao.sys;

import com.beamfield.model.ProjectSupplies;
import com.beamfield.model.ProjectSuppliesExample;
import java.util.List;

import com.beamfield.modelVo.ProjectSuppliesVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
public interface ProjectSuppliesMapper {
    int deleteByPrimaryKey(Long project_supplies_id);

    int insert(ProjectSupplies record);

    int insertSelective(ProjectSupplies record);

    List<ProjectSupplies> selectByExample(ProjectSuppliesExample example);

    ProjectSupplies selectByPrimaryKey(Long project_supplies_id);

    int updateByPrimaryKeySelective(ProjectSupplies record);

    int updateByPrimaryKey(ProjectSupplies record);

	@Delete("delete from  t_project_supplies where project_id =#{0} and beam_id = #{1}")
	int deleteByProjectId(Long pid, Long beamId);

    List<ProjectSuppliesVo> selectByProjectId(@Param("projectId") String projectId,@Param("beamId") long beamId);

    List<ProjectSuppliesVo> selectByNoticeId(@Param("noticeId") long noticeId, @Param("beamId") long beamId);

    int updateNumByPidAndSid(@Param("productId") String productId,@Param("suppliesId") String suppliesId,@Param("num") Double num);

    ProjectSupplies selectBySuppliesIdAndBeamId(@Param("suppliesId") String suppliesId, @Param("beamId") Long beamId, @Param("pid") String pid);
}
